package com.ynet.middleground.contract.bean;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 项目名：ifp-contract <br>
 * 包名：com.ynet.middleground.contract.bean <br>
 * 类名：UploadFileAndSignWithoutAuthReq <br>
 * 描述： 上传文件并进行无认证签章请求信息
 * 
 * @author liulx
 * @create 2022-05-09 15:34
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "上传文件并进行无认证签章请求信息", description = "上传文件并进行无认证签章请求信息")
public class UploadFileAndSignWithoutAuthReq extends EnterpriseBaseReqObj {

    private static final long serialVersionUID = -5919684806080264679L;

    @ApiModelProperty(value = "文件名称，带后缀", notes = "文件名称，带后缀", required = true)
    @NotEmpty(message = "文件名称不能为空")
    private String name;

    @ApiModelProperty(value = "文件流 Base64 格式字符串", notes = "文件流 Base64 格式字符串", required = true)
    @NotEmpty(message = "文件流不能为空")
    private String fileBase64;

    @ApiModelProperty(value = "签署者账号标识", notes = "签署者账号标识", dataType = "String", required = true)
    @NotBlank(message = "签署者账号标识不能为空")
    private String accountId;

    @ApiModelProperty(value = "印章图片id \n注意：印章数据要和账户信息对应，否则会出现签署的印章和背后的数字证书不一致的情况，从而造成签署纠纷",
        notes = "印章图片id \n注意：印章数据要和账户信息对应，否则会出现签署的印章和背后的数字证书不一致的情况，从而造成签署纠纷", dataType = "Integer", required = true)
    @NotNull(message = "印章图片 id 不能为空")
    private Integer sealId;

    @ApiModelProperty(value = "关联合约 id，如果是通过中台生成的合约该项必填", notes = "关联合约 id，如果是通过中台生成的合约该项必填", dataType = "Integer")
    private Integer contractId;

    @ApiModelProperty(value = "场景描述", notes = "场景描述", dataType = "String")
    private String sceneDesc;

    @ApiModelProperty(value = "签署信息", notes = "签署信息", required = true)
    @NotNull(message = "签署信息不能为空")
    @Valid
    private SigningWithoutAuthAndUrlParamBean signInfos;

}
